/**
 * 
 */
package com.et114.components.acegi;

/**
 * @author guanhw
 */
public class AcegiContext {
	public static String FRAMEWORK_ORG_CACHE_KEY = "org.cache.key" ;
	public static String FRAMEWORK_ORG_SINGLE_USER = "single.user" ; 
	
//	public static String FRAMEWORK_ORG_CACHE_TYPE = "org.cache.type" ; 
	
	public static String getOrgCacheKey( ) {
		String orgCacheKey = "name" ; 
		if ( AcegiConfigUtil.getConfig ( ).containsKey ( FRAMEWORK_ORG_CACHE_KEY  ) ) {
			orgCacheKey = AcegiConfigUtil.getConfig ( ).getString ( FRAMEWORK_ORG_CACHE_KEY ) ;
		}
		return orgCacheKey ; 
	}
	
	public static boolean getOrgSingleUser( ) {
		boolean singleUser = false ; 
		if ( AcegiConfigUtil.getConfig ( ).containsKey ( FRAMEWORK_ORG_SINGLE_USER  ) ) {
			singleUser = AcegiConfigUtil.getConfig ( ).getBoolean ( FRAMEWORK_ORG_SINGLE_USER ) ;
		}
		return singleUser ; 
	}
	
	/*
	public static String getOrgCacheType( ) {
		String cacheType = Constants.FRAMEWORK_ORG_CACHE_TYPE_SYSTEM ;
		if ( AcegiConfigUtil.getConfig ( ).containsKey ( FRAMEWORK_ORG_CACHE_TYPE  ) ) {
			cacheType =  AcegiConfigUtil.getConfig ( ).getString ( FRAMEWORK_ORG_CACHE_TYPE ) ;
		}		
		return cacheType ; 
	}*/
}
